New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build libimobiledevice on Windows? #582
Comments
Maybe take a look at https://github.com/libimobiledevice-win32/libimobiledevice (note: I have not tested this) |
I am still surprised we don't have tools already setup to auto build for windows |
@Mradr: They're on NuGet (including wrappers for .NET), you just have to include them in your project if you use a compatible IDE. Ready to use, no need to compile. |
We maintain a fork of libimobiledevice which provides binaries for Windows, macOS and Ubuntu. We also provide the NuGet package @deakjahn refers to. We try to frequently rebase on top of the latest versions of libimobiledevice and keep the delta with 'vanilla' libimobiledevice small. You can find the latest binaries at https://dev.azure.com/libimobiledevice-win32/imobiledevice-net/_build/results?buildId=264&view=logs. Click Artifacts > Binaries to download the binaries. |
@qmfrederik I've not been able to build that repo, been trying for 3 hours. First you get stuck with unable to load file errors due to the paths not pointing to the package include folders. Then you get an error with DEVICE_LOOKUP_USBMUX being undeclared. Followed those instructions and when i try to resolve nuget for ideviceinstaller i get: |
@oddgames-david We've moved from NuGet to VcPkg for the native (libimobiledevice) dependencies. If you just want to download the binaries, you could go to https://dev.azure.com/libimobiledevice-win32/imobiledevice-net/_build/results?buildId=419 where you can find them in the Artifacts folder. Alternatively, https://github.com/libimobiledevice-win32/libimobiledevice-vs has a single Visual Studio solution for the core libimobiledevice parts (though ideviceinstaller isn't part of it, yet) You can also cross-compile from Linux, I think that's how the maintainers of this project do it. |
FYI I compile it with MinGW on Windows. |
@qmfrederik @nikias thanks for the info, i got it compiling with cygwin, been a bit of a learning curve. |
I can't find Artifacts > Binaries in https://dev.azure.com/libimobiledevice-win32/imobiledevice-net/_build/results?buildId=419. Maybe it has changed? |
I've tried compiling it with MinGW and the Cygwin terminal but am getting errors. It looks like Windows doesn't support gdb anymore? I'm trying again be installing a bunch of the dependencies using Cygwin's setup tool.... I did find gdb in Cygwin packages, now i need to figure out the correct paths to use during the config process. I would love to get libimobiledevice running on Windows. |
i did compile libimobile on windows with msys2 |
@mexmer Can please share your steps or make a repo for it ? |
i had installed msys from https://www.msys2.org/ i don't need cython support, so when i got python error after running autogen.sh (for libplist and libimobile) i just did run |
hi @mexmer While I configure libplist ( environment: windows10 git bash, MINGW64, python-devel, pacman intalled ) I got some errors as follows ( Why? I hope no errors. Thanks very much ^_^ ):
|
@yuzhujiutian as i mentioned in my previous post, i compile liplist (and also other libimobile projects) without python/cython support. i don't use this project under python at all. probly nikias will give you answer, but my assumption is, that it was simple not updated to compile with never versions of python. |
@nikias |
I used to use the @qmfrederik 's project because it made things soooo much simpler. It seems that project has been abandoned though. It's far out of sync with this repo. The binaries for Windows that were last published don't work for device backups anymore. This left me with no choice but to build it myself - having read that the latest [unpublished] code does work. The process to build this project on Windows would be far less painful with even basic documentation. What took 4 hours of trial and error and googling to accomplish, should have taken 30 mins. @mexmer provided enough clues I was able to get it going. However, it's far more involved when you are setting up a brand new environment for the first time. In my case, it's msys2 on a Windows 11 VM running on an Intel Mac. I'm not sure if the maintainers here just don't like Windows devs, or if it's just a lack of resources willing to sit down and type out the prerequisites and steps, or some other reason. At any rate, the library is a great solution - if you can get it building. Just my $0.02 - no disrespect to anyone was intended. |
Here is a breakdown of my environment and what I ended up doing to get the libs to build. I hope this saves someone a good chunk of time. I can't speak to whether this workflow is ideal, or even technically correct, but it worked for me. Environment: Installed Packages (via built-in pacman):
Starting Directory: Ordered Build Steps:
Notes:
Full Package Listing (deps of deps of deps...) - Not all are required for libimobiledevice!
|
thanks for thorough guide. i would definetly recommend using msys2 too. |
Is there any plan for moving from MSYS2 to Native Windows build using Visual Studio for example? |
Hi @mbparker, Thanks for the guide, but I am getting the following errors while executing make on libimobiledevice.
I have added the flags you mentioned, and I have checked the path '/usr/include/openssl' the file exists. |
@Shyamal-Shah Not sure what your problem is exactly just from that. I can tell you that I wen't to build the 64bit version last night and encountered all sorts of problems. One of which was very similar to yours. The only way that it would build for me was to uninstall MSYS2 and start with a fresh install - adding the prerequisites using a checklist. Honestly, not sure why it worked fine after that. It seemed to be an identical environment (except that I used the 64bit toolchain). It's much more challenging to build this repo on Windows than Linux or even macOS. If I can get enough free time, I'll run through the whole exercise again and double check the build steps. If you're in a pinch, you can download the repo's CI binaries - but that's not solving the problem long term obviously. Not much help, sorry. |
Just leaving this here: https://github.com/libimobiledevice/libimobiledevice/actions |
@nikias Derp - I stand corrected. I should have have looked at the artifacts, not just the build jobs. Previous comment updated. Thanks. |
Hi @mbparker, thanks solved the errors with the same steps (After a clean install of MSYS2). |
@Shyamal-Shah I don't use iFuse, but as far as I know it can't work on Windows since FUSE only exists for Linux and macOS. It's been a long time since I looked into that though. You can create a virtual filesystem on Windows, but when I investigated that, it was quite complicated to do. |
ifuse subsystem is not available on windows, but you can build your own filesystem browser on top of housearresst service, and afc service, so that's not big deal. |
Hi @mbparker, thanks to you i am able to use libimobiledevice however, I noticed that ideviceinstaller is not part of this repo and I need to compile it separately. Do you have any steps for that?
|
I am using a static libzip to build it, check the workflow here: |
i want to use library of libimobiledevice on windows, and implements functions of export and backup ios.
i guess there must have methods to compile the libraries on windows,but how to do it?
The text was updated successfully, but these errors were encountered: